import java.util.Scanner;

/*取一个整数a从右端开始的4～7位。*/
public class Exerise_32 {
    public static void main(String[] args) {
    String str;
        Scanner sc=new Scanner(System.in);
        str =sc.nextLine();
        char chars[];
        chars=str.toCharArray();
        if(chars.length<7)
            System.out.println("错误");
        System.out.println(chars[chars.length-7]+""+chars[chars.length-6]+""+chars[chars.length-5]+""+chars[chars.length-4]);

    }
}
